Adept/Vantage/Astra

---# of Attacks per turn---

802aae0 - vantage clear here (F395, FA96)
8021
8825
Branch table entry: (F038, FF0A) to xe80000

203a5be=0 means enemy cannot counter attack; therefore vantage cannot activate in favor of enemy

809E9C - brave ability for brave lance
bpr 203a538 1

R00=00000021
0802b098  2120 mov r1, #0x20

R00=00000021
R01=00000020
0802b09a  4008 and r0, r1

R00=00000020 R04=00000001 R08=0203a56c R12=0203a608
R01=00000020 R05=0203a4ec R09=00000000 R13=03007d34
R02=00000000 R06=0203a4ec R10=00000000 R14=0802b089
R03=0203a5ec R07=00000000 R11=00000000 R15=0802b0a0
0802b09c  2800 cmp r0, #0x0
0802b09e  d011 beq $0802b0c4

R00=00000002 R04=03007d5c R08=0203a56c R12=0203a608
R01=0802b03d R05=0203a4ec R09=00000000 R13=03007d40
R02=00080000 R06=0203a4ec R10=00000000 R14=0802b089
R03=0203a5ec R07=00000000 R11=00000000 R15=0802b03e
R00=00000001 R04=03007d5c R08=0203a4ec R12=0203a608
R01=0802b03d R05=fff80000 R09=00000000 R13=03007d40
R02=00000000 R06=0203a56c R10=00000000 R14=0802b089
R03=0203a5f4 R07=00000008 R11=00000000 R15=0802b03e
0802b03c  1c05 add r5, r0, #0x0
0802b03e  2400 mov r4, #0x0
Replace these to insert the skills; register 5 will have the number of attacks for the turn, register 6 will have battle pointer for current turn, register 8 will have battle pointer for opponent

to x3c0010 (F394, FFE8)
Branch table entry: (F038, FF12)

Activation Rate formulae:
Adept=Skl/2+ASpd/2+10
Astra=Skl/2+ASpd/2
Vantage=Skill/2+Avoid-(Enemy Skill+Avoid)

R04=00000000
R05=00000002
0802b040  42ac cmp r4, r5
0802b042  da13 bge $0802b06c
r5 is the number of attacks in a single turn a character will receive

802b83c - #oA is pushed
802b922 - pops number of attacks
802b068 - comparison

Total number of attacks stored at 203a567/203a5e7; limit to A+B<7

---FNG---

Mov LR to Return Address and PC to 8000b88 to use FNG
upon return execute code from 8000c6a
(2164, 4348, 2800, da01, 49xx =$0000ffff, 1840, 1400)

802b2aa
802b2bc
802a544
8000ca4 - 8000caa - FNG routine
8000c66
8000bc2
8000c70
8000c7a
R00=0000005d R04=00000014
08000caa  4284 cmp r4, r0
08000cac  dd00 ble $08000cb0

R00=00000001
0802b2c4  2801 cmp r0, #0x1
0802b2c6  d108 bne $0802b2da (no activation)
R05=0203a608
0802b2c8  682b ldr r3, [r5, #0x0] (activation)
R03=0203a5ec

203a55c - level moved to here
203a95c - RN stored here
203a608 - Battle Data pointer stored here

Activation FN=((First FN)*2+1) eor ((Last FN)*2048+(Middle FN)/32) and 0xFFFF))*64/(65536)